<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:cc="http://java.sun.com/jsf/composite"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <!-- INTERFACE -->
    <cc:interface>
        <cc:attribute name="bill" />
        <cc:attribute name="str" />
    </cc:interface>

    <!-- IMPLEMENTATION -->
    <cc:implementation>
        <h:outputStylesheet library="css" name="pharmacypos.css"/>
        <div class="posbill noBorder summeryBorder" >


            <div class="headingBill">
                <h:outputLabel value="Adjustment Note : " style="text-decoration: underline;"/>  
                <h:outputLabel value=" #{cc.attrs.str}" style="text-decoration: underline;"/>  
            </div>

            <h:panelGrid columns="4" style="min-width: 100%;">

                <h:outputLabel value="Adj No "/>
                <h:outputLabel value="#{cc.attrs.bill.deptId}"/> 


                <h:outputLabel value="Adjusted At  "/>
                <h:outputLabel value="#{cc.attrs.bill.createdAt}">
                    <f:convertDateTime pattern="dd/MMM/yyyy - hh:mm:ss a"/>
                </h:outputLabel >

                <h:outputLabel value="Adjusted By  "/>
                <h:outputLabel value="#{cc.attrs.bill.creater.webUserPerson.name}">
                </h:outputLabel>

                <h:outputLabel value="Drawer Name "/>
                <h:outputLabel value="#{cc.attrs.bill.cashTransaction.drawer.name}">
                </h:outputLabel>
            </h:panelGrid>


            <div >
                <h:panelGrid columns="2">
                    <f:facet name="header">
                        <h:outputLabel value="Before Adjustment"/>
                    </f:facet>
                    <h:outputLabel value="Cash Value :"/>
                    <h:outputLabel value="#{cc.attrs.bill.cashTransaction.cashTransactionHistory.cashBallance}"
                                   style="float: right;">
                        <f:convertNumber pattern="#000.00"/>
                    </h:outputLabel>
                    <h:outputLabel value="Credit Card Value :"/>
                    <h:outputLabel value="#{cc.attrs.bill.cashTransaction.cashTransactionHistory.creditCardBallance}"
                                   style="float: right;">
                        <f:convertNumber pattern="#000.00"/>
                    </h:outputLabel>
                    <h:outputLabel value="Cheque Value "/>
                    <h:outputLabel value="#{cc.attrs.bill.cashTransaction.cashTransactionHistory.chequeBallance}"
                                   style="float: right;">
                        <f:convertNumber pattern="#000.00"/>
                    </h:outputLabel>
                    <h:outputLabel value="Slip Value "/>
                    <h:outputLabel value="#{cc.attrs.bill.cashTransaction.cashTransactionHistory.slipBallance}"
                                   style="float: right;">
                        <f:convertNumber pattern="#000.00"/>
                    </h:outputLabel>
                </h:panelGrid>

                <h:panelGrid columns="2">
                    <f:facet name="header">
                        <h:outputLabel value="After Adjustment"/>
                    </f:facet>
                    <h:outputLabel value="Cash Value :"/>
                    <h:outputLabel value="#{cc.attrs.bill.cashTransaction.cashValue+cc.attrs.bill.cashTransaction.cashTransactionHistory.cashBallance}"
                                   style="float: right;">
                        <f:convertNumber pattern="#000.00"/>
                    </h:outputLabel>
                    <h:outputLabel value="Credit Card Value :"/>
                    <h:outputLabel value="#{cc.attrs.bill.cashTransaction.creditCardValue+cc.attrs.bill.cashTransaction.cashTransactionHistory.creditCardBallance}"
                                   style="float: right;">
                        <f:convertNumber pattern="#000.00"/>
                    </h:outputLabel>
                    <h:outputLabel value="Cheque Value "/>
                    <h:outputLabel value="#{cc.attrs.bill.cashTransaction.chequeValue+cc.attrs.bill.cashTransaction.cashTransactionHistory.chequeBallance}"
                                   style="float: right;">
                        <f:convertNumber pattern="#000.00"/>
                    </h:outputLabel>
                    <h:outputLabel value="Slip Value "/>
                    <h:outputLabel value="#{cc.attrs.bill.cashTransaction.slipValue+cc.attrs.bill.cashTransaction.cashTransactionHistory.slipBallance}"
                                   style="float: right;">
                        <f:convertNumber pattern="#000.00"/>
                    </h:outputLabel>
                </h:panelGrid>

            </div>

            <h:panelGrid columns="2" style="min-width: 100%;">
                <h:outputLabel value="Comment" ></h:outputLabel>
                <h:outputLabel value="#{cc.attrs.bill.comments}" >
                </h:outputLabel>
            </h:panelGrid>
        </div>
    </cc:implementation>
</html>
